from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time
testCase="DBshop015_侧边设置删除"
testName="网站很好看"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
time.sleep(1)
DBshopEnterMenu3(firefox,"商品管理","管理分类","前台侧边设置")
firefox.find_element_by_xpath(
    "//td[contains(.,'%s')]/following-sibling::td[3]/a[2]"%testName).click()
firefox.switch_to.alert.accept()
time.sleep(3)
try:
    if firefox.find_element_by_xpath("//td[contains(.,'%s')]"%testName).is_displayed():
        writeLog("%s 测试失败" % testCase)
        getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)
    time.sleep(2)
firefox.quit()